package com.jeeboot.system.datasources;


import com.jeeboot.modules.app.entity.UserEntity;
import com.jeeboot.modules.app.service.UserService;
import com.jeeboot.system.datasources.annotation.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * Created by IntelliJ IDEA.
 * 作者: 李折训
 * 邮箱：370261528@qq.com
 * QQ群：571785017
 * 时间: 2017/12/03
 * 功能:测试
 */
@Service
public class DataSourceTestService {
    @Autowired
    private UserService userService;

    public UserEntity queryObject(Long userId){
        return userService.queryObject(userId);
    }

    @DataSource(name = DataSourceNames.SECOND)
    public UserEntity queryObject2(Long userId){
        return userService.queryObject(userId);
    }
}
